/// userId : 101
/// userName : "Kimi"
/// nickName : null
/// avatar : "https://randomuser.me/api/portraits/men/14.jpg"
/// relation : 5
/// createTime : 1726157453000
/// fansCnt : 1
/// followCnt : 1
///
class UserProfileModel {
  UserProfileModel({
      num? userId, 
      String? userName, 
      dynamic nickName, 
      String? avatar, 
      num? relation, 
      num? createTime,
      int? gender,
      String? birthDay,
      num? fansCnt, 
      num? followCnt,}){
    _userId = userId;
    _userName = userName;
    _nickName = nickName;
    _avatar = avatar;
    _relation = relation;
    _createTime = createTime;
    _fansCnt = fansCnt;
    _followCnt = followCnt;
    _gender=gender;
    _birthDay=birthDay;
}

  UserProfileModel.fromJson(dynamic json) {
    _userId = json['userId'];
    _userName = json['userName'];
    _nickName = json['nickName'];
    _avatar = json['avatar'];
    _relation = json['relation'];
    _createTime = json['createTime'];
    _fansCnt = json['fansCnt'];
    _followCnt = json['followCnt'];
    _gender = json['gender'];
    _birthDay=json['birthDay'];

  }
  num? _userId;
  String? _userName;
  dynamic _nickName;
  String? _avatar;
  String? _birthDay;
  int ? _gender;
  num? _relation;
  num? _createTime;
  num? _fansCnt;
  num? _followCnt;
UserProfileModel copyWith({  num? userId,
  String? userName,
  dynamic nickName,
  String? avatar,
  num? relation,
  String? birthDay,
  int ? gender,
  num? createTime,
  num? fansCnt,
  num? followCnt,
}) => UserProfileModel(  userId: userId ?? _userId,
  userName: userName ?? _userName,
  nickName: nickName ?? _nickName,
  avatar: avatar ?? _avatar,
  relation: relation ?? _relation,
  createTime: createTime ?? _createTime,
  fansCnt: fansCnt ?? _fansCnt,
  gender:gender?? _gender,
  followCnt: followCnt ?? _followCnt,
  birthDay:birthDay ??_birthDay,
);
  num? get userId => _userId;
  String? get userName => _userName;
  dynamic get nickName => _nickName;
  String? get avatar => _avatar;
  num? get relation => _relation;
  num? get createTime => _createTime;
  num? get fansCnt => _fansCnt;
  num? get followCnt => _followCnt;
  int? get gender=>_gender;
  String ? get birthDay=>_birthDay;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['userId'] = _userId;
    map['userName'] = _userName;
    map['nickName'] = _nickName;
    map['avatar'] = _avatar;
    map['relation'] = _relation;
    map['createTime'] = _createTime;
    map['fansCnt'] = _fansCnt;
    map['followCnt'] = _followCnt;
    map['gender'] = _gender;
    map['birthDay'] = _birthDay;
    return map;
  }

}